package jsyf.oa.entity.contract;

import com.alibaba.fastjson.JSONObject;

import javax.persistence.Entity;
import javax.persistence.Table;

import jsyf.oa.ientity.BaseEntity;

import java.math.BigDecimal;


/**
 * Created by Administrator on 2018/9/27 0027.
 */
@Entity
@Table(name = "t_con_available", schema = "oa", catalog = "")
public class AvailableEntity extends BaseEntity {
    private String mainId;
    private String availableDate;
    private BigDecimal availableMoney=new BigDecimal("0.00");
    private String availableType;
    private String repaymentAttachName = "";
    private String repaymentAttachUrl = "";
    private String remark="";
    private String createUserId;
    private String createUserName;
    private BigDecimal canUseMoney= new BigDecimal("0.00");


    public String getMainId() {
        return mainId;
    }

    public void setMainId(String mainId) {
        this.mainId = mainId;
    }

    public String getAvailableDate() {
        return availableDate;
    }

    public void setAvailableDate(String availableDate) {
        this.availableDate = availableDate;
    }

    public BigDecimal getAvailableMoney() {
        return availableMoney;
    }

    public void setAvailableMoney(BigDecimal availableMoney) {
        this.availableMoney = availableMoney;
    }

    public String getAvailableType() {
        return availableType;
    }

    public void setAvailableType(String availableType) {
        this.availableType = availableType;
    }

    public String getRepaymentAttachName() {
        return repaymentAttachName;
    }

    public void setRepaymentAttachName(String repaymentAttachName) {
        this.repaymentAttachName = repaymentAttachName;
    }

    public String getRepaymentAttachUrl() {
        return repaymentAttachUrl;
    }

    public void setRepaymentAttachUrl(String repaymentAttachUrl) {
        this.repaymentAttachUrl = repaymentAttachUrl;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public BigDecimal getCanUseMoney() {
        return canUseMoney;
    }

    public void setCanUseMoney(BigDecimal canUseMoney) {
        this.canUseMoney = canUseMoney;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("MAIN_ID", getMainId());
        obj.put("AVAILABLE_DATE", getAvailableDate());
        obj.put("AVAILABLE_MONEY", getAvailableMoney());
        obj.put("AVAILABLE_TYPE", getAvailableType());
        obj.put("CREATE_USER_ID", getCreateUserId());
        obj.put("CREATE_USER_NAME", getCreateUserName());
        obj.put("CREATE_TIME", getCreateTime());
        obj.put("REMARK", getRemark());
        obj.put("REPAYMENT_ATTACH_NAME", getRepaymentAttachName());
        obj.put("REPAYMENT_ATTACH_URL", getRepaymentAttachUrl());
        return obj;
    }

    @Override
    public String getTableName() {
        return "t_con_available";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("MAIN_ID", "manId");
        obj.put("AVAILABLE_DATE", "availableDate");
        obj.put("AVAILABLE_MONEY", "availableMoney");
        obj.put("AVAILABLE_TYPE", "availableType");
        obj.put("CREATE_USER_ID", "createUserId");
        obj.put("CREATE_USER_NAME", "createUserName");
        obj.put("CREATE_TIME", "createTime");
        obj.put("REPAYMENT_ATTACH_NAME", "repaymentAttachName");
        obj.put("REPAYMENT_ATTACH_URL", "repaymentAttachUrl");
        obj.put("REMARK", "remark");
        return obj;
    }

}
